﻿using STHPMS1.ICore.I_Entity.Stmpms1;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace STHPMS1.ICore.I_Serv
{
    /// <summary>
    /// 模型计算服务
    /// </summary>
    public interface IModelCalculateService : IService
    {
        /// <summary>
        /// 模型
        /// </summary>
        IDm_Modelgroup Model { get;  }
        /// <summary>
        /// 通过x计算y值
        /// </summary>
        /// <param name="x"></param>
        /// <returns></returns>
        double CalculateY(double x);
        /// <summary>
        /// 通过y计算x值
        /// </summary>
        /// <param name="y"></param>
        /// <returns></returns>
        double CalculateX(double y);
        /// <summary>
        /// 输出公式
        /// </summary>
        /// <returns></returns>
        string PrintForumla();
    }

    /// <summary>
    /// 直线型公式821 接口  y=ax+b;
    /// </summary>
    public interface IEquation1Service : IModelCalculateService
    {
        double A { get; }
        double B { get; }
    }
     /// <summary>
    /// 多项式公式823 接口 y=ax+bx²+cx³+d
    /// </summary>
    public interface IEquation2Service:IModelCalculateService
    {
        double A { get; }
        double B { get; }
        double C{ get; }
        double D { get; }
    }
    /// <summary>
    /// 指数型公式822 接口  y=a-bx-cx²
    /// </summary>
    public interface IEquation3Service:IModelCalculateService
    {
        double A { get; }
        double B { get; }
    }

    /// <summary>
    /// S型公式824 接口  y=a-bx-cx²
    /// </summary>
    public interface IEquation4Service : IModelCalculateService
    {
        double A { get; }
        double B { get; }
    }
}
